<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	template="/pages/templates/TemplateVisiteur.xhtml">

	<ui:define name="titre">Comme au resto</ui:define>
	<ui:define name="content">
		<h:head>
	    Ajout d'un Nouveau Restaurant
		<br/> <br/> <br/>
	</h:head>
	<h:body>
		
	<h:form> 
 	<br/>
 	<table>
	<tr> 
		<h:outputText value="Nom du restaurant :" /> 
		<h:inputText value="#{CreeRestauMB.nom}" required="true" requiredMessage="Nom du restaurant manquant" /> 
	</tr>
	<tr>
		<h:outputText value="Adresse email du contact : " /> 
		<h:inputText value="#{CreeRestauMB.emailContact}" required="true" requiredMessage="Email de contact du restaurant manquant" /> 
	</tr>
	<tr>
		<h:outputText value="Nom du contact :" /> 
		<h:inputSecret value="#{CreeRestauMB.prenomContact}"/> <h:outputText value="#{CreeRestauMB.messagepwd}" />
	</tr>
	<tr><td>Nom du contact : </td><td><h:inputText value ="#{CreeRestauMB.nomContact}" required="true" requiredMessage="Nom manquant" /> </td></tr>
	<tr><td>Prénom du contact : </td><td><h:inputText value ="#{CreeRestauMB.prenomContact}" /></td></tr>
	<tr/><tr/>
	<tr>
        <h:outputText value="Type de cuisine : " />  
        <p:selectOneMenu value="#{buttonBean.number}">  
            <f:selectItem itemLabel="Choisissez..." itemValue="" />  
 			<f:selectItems value="#{CreeRestauMB.specialités}" var="specialite" itemLabel="#{specialite.libelle}" itemValue="#{specialite}"/>
         </p:selectOneMenu>  
	</tr>
	<tr><td>Numéro : </td><td><h:inputText value ="#{CreeRestauMB.numeroRue}"/></td><td> Voie :</td><td><h:inputText value ="#{CreeRestauMB.rue.nomRue}" required="true" requiredMessage="Voie manquante"/></td></tr>
	<tr><td>Ville : </td><td><h:inputText value ="#{CreeRestauMB.ville.nomVille}"  required="true" requiredMessage="Ville manquante"/></td></tr>
	<tr><td>CP : </td><td><h:inputText value ="#{CreeRestauMB.codePostal}" required="true" requiredMessage="Code postal manquant">
	</h:inputText></td></tr>
	
	</table>
	<br/><br/>
	<h:commandButton value="Sauvegarder"  action="#{CreeRestauMB.doSauve}"/>
	 <br/> <br/>
	</h:form> 
	</h:body>
</ui:define>
</ui:composition>
